network object
This method will initialise and set up the network object in client mode.
bool setup_client(int channels, int max_peers)
Parameters:
channels
The number of channels that are used by the client. The maximum is 100.
max_peers
The maximum number of peers that the client can be connected with simultaneously. The maximum is 4000.
Return value:
true if the client was set up successfully, false otherwise.
Remarks:
This method is used to set up the network object in client mode. This means that it will not listen for any incoming connections.
Please note that it is perfectly legal for a client to make more than one outgoing connection at once, hence the max_peers parameter.
Example:
See the main network chapter.